﻿using System.IO;

namespace Core.Tools
{
    public static class IOHelper
    {
        /// <summary>
        /// 递归创建目录
        /// </summary>
        /// <param name="Info">需要创建的目录信息</param>
        public static void CreateDirectory(DirectoryInfo Directory)
        {
            if (Directory == null || Directory.Exists)
            {
                return;
            }

            CreateDirectory(Directory.Parent);

            Directory.Create();
        }
    }
}